// Funcion para limpiar los espacios en blanco
function ltrim(s) { return s.replace(/^\s+/, ""); }  
function rtrim(s) { return s.replace(/\s+$/, ""); }  
function trim(s)  { return rtrim(ltrim(s)); }

function fncLimpiarFormulario(frm,obj){
	frm.reset();
	obj.focus();
}
function convertirMayuscula(obj){
	obj.value = obj.value.toUpperCase();
}
function colorFondo(src,clrOver) {
	src.bgColor = clrOver;
}
function colorBorde(src,prop){
	src.style.border = prop;
}
function soloMayusculas(obj){
	obj.value = obj.value.toUpperCase();	
}
function cambiarEstilo(obj,estilo){
	obj.className = estilo;
}
function cambiarEstiloImg(obj,estilo){
	document.getElementById(obj).className = estilo;
}
function oClick(url){
	document.location.href = url;
}
function mostrarOcultarCapa(capa,opc){
	document.getElementById(capa).style.display = opc;
}
function contar(form,name) {
	n = document.forms[form][name].value.length;
	t = 150; 
	if (n > t) {
		document.forms[form][name].value = document.forms[form][name].value.substring(0, t);
	}else{
		document.forms[form]['result'].value = t-n;
	}
}
function cargarVideo(url){
	tb_show("Video",url,false);
}